import {messages} from "share/common";
import React, { Component } from 'react'
import AdvancedTable from "components/advanced-table"
import DataHoc from "../pay-check/data-hoc"
import httpFetch from "share/httpFetch";

class DoneRecheck extends Component {

  key = 'done-recheck';

  state = {
    searchForm: this.props.getSearchForm(this.key)
  };

  service = (page, pageSize, searchParams) => {
    return httpFetch.post(`/payment/api/cash/bankPay/queryBatch`, { page, size: pageSize, ...searchParams, hasChecked: true, isPreChecked: true });
  };

  render() {
    const { getColumns } = this.props;
    const { searchForm } = this.state;
    return (
      <div style={{ height: 'calc(100vh - 110px)' }}>
        <AdvancedTable
          title={messages('finance-4.key86')/*已复核*/}
          tableName='done-recheck'
          service={this.service}
          onRef={ref => this.advancedTableRef = ref}
          searchForm={searchForm}
          rowKey="id"
          columns={getColumns(this.key)}
        />
      </div>
    )
  }

}

export default DataHoc(DoneRecheck)
